﻿

using DLL.NET50.DB.CRUD;
using DLL.NET50.DB.MS.Entity;
using DLL.NET50.DB.MS.ORM.Repository;
using DLL.NET50.DB.MS.ORM.UOW;
using DLL.NET60.DB.MS.Entity.DTO;
using System;
using System.Collections.Generic;
using System.Text;

namespace DLL.NET50.DB.MS.ORM.Service
{
    public interface IWorkFileService:IBaseService<adi_work_file>
    {
        List<DTO_adi_work_file> GetAllWorkFile();
        List<DTO_adi_work_file> GetAllWorkFile(int erkeMode);
        bool AddWorkFile(DTO_adi_work_file entity);
        bool SaveWorkFile(DTO_adi_work_file entity);
        bool DeleteWorkFile(DTO_adi_work_file entity);
        bool UpdateWorkFile(DTO_adi_work_file entity);
        List<DTO_adi_work_file> WfWorkFile(string drugCode, string pycode, string drugname);
    }
    public class CWorkFileService:BaseService<adi_work_file>,IWorkFileService
    {
        protected IWorkFileRepository _repository;


        public CWorkFileService(IWorkFileRepository repository) : base(repository)
        {
            this._repository = repository;
        }

        public List<DTO_adi_work_file> GetAllWorkFile()
        {
            return _repository.GetAllWorkFile();
        }
        public List<DTO_adi_work_file> GetAllWorkFile(int erkeMode)
        {
            return _repository.GetAllWorkFile(erkeMode);
        }
        public bool AddWorkFile(DTO_adi_work_file entity)
        {
            return _repository.AddWorkFile(entity);
        }
        public bool SaveWorkFile(DTO_adi_work_file entity)
        {
            return _repository.SaveWorkFile(entity);
        }
        public bool DeleteWorkFile(DTO_adi_work_file entity)
        {
            return _repository.DeleteWorkFile(entity);
        }
        public bool UpdateWorkFile(DTO_adi_work_file entity)
        {
            return _repository.UpdateWorkFile(entity);
        }
        public List<DTO_adi_work_file> WfWorkFile(string drugCode, string pycode, string drugname)
        {
            return _repository.WfWorkFile(drugCode, pycode, drugname);
        }
    }
}
